<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vu中CSS动画原理</title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.v-enter,.v-leave-to{
				opacity: 0;
			}
			
			.v-enter-active,.v-leave-active{
				transition: opacity 2s;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<transition>
			<div v-if="show">
				hello world
			</div>
			</transition>
			<button @click="handleClick">切换</button>
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el:"#app",
				data:{
					show: true
				},
				methods:{
					handleClick:function(){
						this.show = !this.show
					}
				}
			});
		</script>
	</body>
</html>
